package com.phantasy.loaders
{
	import flash.utils.ByteArray;
	import flash.utils.Dictionary;
	/**
	 *通用定位器 
	 * @author Liseen
	 * 
	 */	
	public class CommonLocator
	{
		public static const SKILL_XML_PATH:String = "skillTree.xml";
		public static const SKILL_EFFECT:String = "skillEffect.xml";
		public static const EQUIP_ADD_URL:String = "eqiups_attribute.xml";
		public static const EQUIP_URL:String = "equips.xml";
		public static const ITEM_URL:String = "generals.xml";
		public static const STONE_URL:String = "stones.xml";
		public static const MATERIAL_URL:String = "kind_material.xml";
		public static const WORLD_URL:String = "maps.xml";
		public static const MONSTER_URL:String = "monster.xml";
		public static const BUFF_XML_PATH:String = "buff.xml";
		public static const SERVER_NPC_URL:String = "server_npc.xml";
		public static const COLLECT:String = "collect.xml";
		public static const FAMILY_YBC:String = "familyYBC.xml";
		public static const SAY_XML_PATH:String = "say.xml";
		public static const TITLE:String = "title.xml";
		public static const MATERIAL:String = "material.xml";
		public static const PET_URL:String = "pet.xml";
		public static const PET_SAY_URL:String = "petSay.xml";
		public static const PET_GENIUS:String = "petGenius.xml";
		public static const PET_GROW:String = "petGrow.xml";
		public static const MOUNT_UPGRADE:String = "mountUpgrade.xml";
		public static const MATERIALID:String = "materialID.xml";
		public static const EXPRESION:String = "expresion.xml";
		public static const VIP:String = "vip.xml";
		public static const ITEMLINK:String = "itemLink.xml";
		public static const MONSTER_POS:String = "monsterPos.xml";
		public static const HELP:String = "help.xml";
		public static const STOVE:String = "stove.xml";
		public static const ITEM_CD_TIME:String = "item_cd_time.xml";
		public static const PET_SUIT:String = "petSuit.xml";
		public static const REFINING:String = "refining.xml";
		public static const NAVBAR:String = "navbar.xml";
		public static const SUIT_STRENGTH:String = "suitStrength.xml";
		public static const MAP_INSCRIPTION:String = "maps_inscription.xml";
		public static const MISSION_NPC:String = "mission.xml";
		public static const ONLINE_AWARD:String = "onlineAward.xml";
		public static const COPPERFB:String = "copperFB.xml";
		public static const TARGET_DATA:String = "target.xml";
		
		private static var map:Dictionary;
		
		
		public static function parseXMLFile(data:ByteArray):void
		{
			var _local2:String;
			var _local3:int;
			var _local4:ByteArray;
			if (data)
			{
				data.uncompress();
				map = new Dictionary();
				while (data.bytesAvailable != 0)
				{
					_local2 = data.readUTF();
					_local3 = data.readInt();
					_local4 = new ByteArray();
					data.readBytes(_local4, 0, _local3);
					map[_local2] = _local4;
				}
			}
		}
		
		public static function getXML(_arg1:String):XML
		{
			return (new XML(map[_arg1]));
		}
		
		public static function getXMLList(_arg1:String):XMLList
		{
			return (new XMLList(map[_arg1]));
		}
		
		public static function getData(_arg1:String)
		{
			return (map[_arg1]);
		}

	}
}